import ts from "rollup-plugin-typescript2";
import serve from "rollup-plugin-serve";

const path = require("path");
console.log(__dirname);
export default {
  input: "./src/index.ts",
  output: {
    // file: "./dist/index.js",
    file: path.resolve(__dirname, "dist/index.js"),
    format: "umd", // todo iife
    // name: "tsTest",
    sourcemap: true,
  },
  plugins: [
    ts(),
    // {
    // tsconfig: "tsconfig.json"
    // }
    serve({
      open: true,
      openPage: "/public/index.html",
      port: 3000,
      contentBase: "",
    }),
  ],
};
